const Mock = require('mockjs')

const data = Mock.mock({
  'items': {
    'legendData|4': ['@cfirst'],
    'legendColor|4': [() => Mock.Random.color()],
    'visColor|6': [() => Mock.Random.color()],
    'nowDate': ['@date("yyyy/MM")']
  }
})

module.exports = [
  {
    url: '/vue-admin-template/map',
    type: 'get',
    response: config => {
      const items = data.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
